# include <stdio.h>
int main()
{
	int n,i;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		int t;
		int a,b,c;
		int X[100];
		int m,p,g;
		scanf("%d",&m);
	    g=m;
		for(p=0;p<m;p++){
			scanf("%d",&X[p]);
		}
		for(a=0;a<m-1;a++){
			t=X[a];
			for(b=a+1;b<m;b++)
			if(t-X[b]==0){
			
				g--;
				break;
		}
		}

	printf("%d\n",g);
}
	
	return 0;
  } 
